<?php




namespace app\common\controller;


use app\admin\model\Admin;
use app\common\BaseController;
use think\App;
use think\facade\Env;
use LhpAmis\Traits;
use EasyAdmin\annotation\ControllerAnnotation;
use EasyAdmin\annotation\NodeAnotation;
use think\facade\Cache;

/**
 * @ControllerAnnotation(title="amis后台管理")
 */
class AmisAdminController extends BaseController
{
    protected $primaryKey = 'id';
    // use Traits\JumpTrait;
    // use Traits\ExportTrait;
    // use Traits\UploadTrait;
    use Traits\RequestTrait;
    use Traits\ElementTrait;
    // use Traits\QueryPathTrait;
    // use Traits\FileManagerTrait;
    use Traits\IconifyPickerTrait;
    use Traits\AmisAdminTrait;
    use Traits\ButtonsTrait;
    use Traits\BaseApiTrait;
    use Traits\UploadTrait;

    protected $uid = '';
    protected $userinfo = [];

    public function initialize()
    {
        $this->uid = $this->app->token->getClaim('admin_id');
        $this->userinfo = Admin::where('id', $this->uid)->findOrEmpty()->toArray();
         $this->diskDriver = config('filesystem.default');
    }
}
